package com.itheima.health.service.impl;

import com.itheima.health.dao.MemberDao;
import com.itheima.health.pojo.Member;
import com.itheima.health.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberServiceImpl implements MemberService {
    @Autowired
    private MemberDao memberDao;
    /**
     * 根据手机号查找是否有这个用户
     * @param telephone
     * @return
     */
    @Override
    public Member getMemberByPhone(String telephone) {
        return memberDao.getMemberByPhone(telephone);

    }

    /**
     * 添加新用户
     * @param member
     */
    @Override
    public void addMember(Member member) {
        memberDao.addMember(member);
    }

    /**
     * 更新用户信息
     * @param member
     */
    @Override
    public void updateMember(Member member) {
        memberDao.updateMember(member);
    }
}
